package com.ruoyi.framework.shiro.token;

import com.ruoyi.common.enums.LoginType;
import org.apache.shiro.authc.UsernamePasswordToken;

public class UserToken extends UsernamePasswordToken {
    private static final long serialVersionUID = 1L;

    private LoginType type;

    //密码登陆
    public UserToken(String username, String password, LoginType type, boolean rememberMe) {
        super(username, password, rememberMe);
        this.type = type;
    }

    //免密
    public UserToken(String username, LoginType type) {
        super(username, "", false);
        this.type = type;
    }

    public UserToken(String username, String password, LoginType type)  {
        super(username, password, false);
        this.type = type;
    }

    public LoginType getType() {
        return type;
    }

    public void setType(LoginType type) {
        this.type = type;
    }

}
